import fly from '@/common/js/request'

/** 获取token状态 */
export const getLogin = (code) => fly.post('/Liteapp/Login', {
  code
})

/** 登录验证
 * cellphone,
 *  validCode */
export const SaveBind = (obj) => fly.post('/Liteapp/Bind',
  obj
)

/**
 * 获取短信验证码
 * @param cellphone
 * @returns {*}
 * @constructor
 */
export const ValidCodeForBind = (cellphone) => fly.post('/Liteapp/ValidCodeForBind', {
  cellphone
})
/** 小程序用户信息保存
 */
export const LiteappUserinfoSubscribe = (parame) => fly.post('/Liteapp/LiteappUserinfoSubscribe',
  parame
)
/** 获取最近订购记录
 */
export const EvianLastBuyProduct = () => fly.post(' /Liteapp/EvianLastBuyProduct ')

/** 获取报价
 */
export const BaoJiaLiteapp = () =>
  fly.post('/Liteapp/BaoJiaLiteapp')

/** 获取用户地址
 */
export const DiZhiLiteapp = (KH_ID) =>
  fly.post('/Liteapp/DiZhiLiteapp', {
    KH_ID
  })
/** 可预约时间 */
export const YuYueTimeLiteapp = (KH_ID) =>
  fly.post('/Liteapp/YuYueTimeLiteapp', {
    KH_ID
  })

/** 保存订单 */
export const OrderSave = (parame) =>
  fly.post('/Liteapp/OrderSave', parame)
/** 广告 */
export const LiteappNotify = () =>
  fly.post('/Liteapp/LiteappNotify')
/** 查询欠桶押桶情况
 */
export const QianTongLiteapp = () =>
  fly.post('/Liteapp/QianTongLiteapp')
/** 查询及选择赠品
 */
export const ZengPinLiteapp = () =>
  fly.post('/Liteapp/ZengPinLiteapp')

/** 订单列表 */
export const OrdersLiteapp = (DB_ZT) =>
  fly.post('/Liteapp/OrdersLiteapp', {
    DB_ZT
  })

/** 订单详情 */
export const OrdersDetail = (DB_INDEX) =>
  fly.post('/Liteapp/OrdersDetail', {
    DB_INDEX
  })

  /** 标准商品 */
export const BiaoZhunShangPin = (parame) =>
  fly.post('/Liteapp/BiaoZhunShangPin', parame)

/** 标准商品分类 */
export const SpShuXing = (DB_INDEX) =>
  fly.post('/Liteapp/SpShuXing', {
    DB_INDEX
  })

  /** 标准商品分类 */
export const OrderCancel = (params) =>
  fly.post('/Liteapp/OrderCancel', params)
